﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.CompilerServices;
using Microsoft.SharePoint;

/*
Developed By: Bhupender Bindra
Developed On: 22th Nov 2010
Description: The code provides the user to download the files in zip folder.   
*/

namespace DownloadContentKit.Classes
{
    public static class SPExtensions
    {

        /// <summary>
        /// check the item folder
        /// </summary>
        /// <param name="item"></param>
        /// <returns></returns>
        public static bool IsFolder(this SPListItem item)
        {
            return (item.Folder != null);
        }

        /// <summary>
        /// check the document library
        /// </summary>
        /// <param name="list"></param>
        /// <returns></returns>
        public static bool IsDocumentLibrary(this SPList list)
        {
            return (list.BaseType == SPBaseType.DocumentLibrary);
        }
    }
}
